package com.CST.service.zx;

import com.CST.dto.zx.DeptBalanceDetailDTO;
import com.CST.dto.zx.EndingBalanceDTO;
import com.CST.dto.zx.PrimusCashDTO;
import com.CST.dto.zx.ZxDeptDirectorFundDTO;
import com.CST.entity.zx.ZX_PrimusCash;
import com.CST.entity.zx.ZxDeptDirectorFund;
import com.CST.vo.zx.AllDeptVO;
import com.CST.vo.zx.DeptBalanceDetailVO;
import com.CST.vo.zx.EndingBalanceVO;
import com.CST.vo.zx.PrimusCashVO;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author xnd
 * @since 2023-05-05
 */
public interface ZxDeptDirectorFundService extends IService<ZxDeptDirectorFund> {

    /**
     * 采集科主任基金数据
     * @param dto
     * @return
     */
    String gatherDeptDirectorInfo(ZxDeptDirectorFundDTO dto);

    /**
     * 科室汇总数据
     *
     * @param dto
     * @return
     */
    List<EndingBalanceVO> listDeptDirectorFundBalance(EndingBalanceDTO dto);

    /**
     * 科室查询明细
     * @param dto
     * @return
     */
    List<DeptBalanceDetailVO> DeptDirectorFundBalanceByCode(DeptBalanceDetailDTO dto);

    /**
     * 科主任基金科室下拉框
     * @return AllDeptVO列表
     */
    List<AllDeptVO> listDept();

    /**
     * 科主任基金2019期初设置
     * @return PrimusCashVO列表
     */
    List<PrimusCashVO> listPrimusCash(PrimusCashDTO entity);

    /**
     * 科主任基金导出
     *
     * @param response
     * @param dto
     */
    void download(HttpServletResponse response, EndingBalanceDTO dto) throws IOException;

    void downloadDept(HttpServletResponse response, EndingBalanceDTO dto) throws IOException;

    /**
     * 科主任基金明细导出
     * @param response
     * @param dto
     * @throws IOException
     */
    void downloadE(HttpServletResponse response, DeptBalanceDetailDTO dto)throws IOException;

    Boolean saveOrUpdate(ZX_PrimusCash entity);

    Boolean deletePrimusCash(Integer id);


    Page<PrimusCashVO> xnsns(String year);
}
